<!-- 收益 -->
<template>
	<view class="container">
		<view class="content">
			<image class="bg" src="/static/images/index-business/income.png" mode="aspectFill"></image>
			<view class="item" v-for="(item, index) in list" :key="index">
				<text class="today">{{item.today}}</text>
				<text class="label">{{item.label}}</text>
				<text class="yesterday">昨日:{{item.yesterday}}</text>
			</view>
		</view>
	</view>
</template>

<script setup>
	const list = [
		{ label: '今日收入(元)', today: '5362.05', yesterday: '2305.62' },
		{ label: '今日订单量', today: '232', yesterday: '188' },
		{ label: '昨日订单量', today: '1058', yesterday: '1203' },
	]
</script>

<style lang="scss" scoped>
	.container {
		padding: 0 25rpx;
	}

	.content {
		position: relative;
		z-index: 1;
		display: flex;
		justify-content: space-around;
		align-items: flex-start;
		height: 220rpx;
		border-radius: 20rpx;
		padding-top: 32rpx;
		box-sizing: border-box;

		.bg {
			position: absolute;
			top: 0;
			left: 0;
			z-index: -1;
			width: 100%;
			height: 100%;
		}
		
		.item {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			
			.today {
				font-weight: bold;
				font-size: 40rpx;
				color: #222222;
				line-height: 1.5;
			}
			
			.label {
				font-size: 24rpx;
				color: #222222;
				line-height: 1.5;
			}
			
			.yesterday {
				font-size: 24rpx;
				color: #222222;
				line-height: 1.5;
				margin-top: 30rpx;
			}
		}
	}
</style>